package com.nf.xiaomi.service.impl;

import com.nf.xiaomi.dao.UserDao;
import com.nf.xiaomi.dao.impl.UserDaoImpl;
import com.nf.xiaomi.entity.UsersEntity;
import com.nf.xiaomi.service.UserService;

import java.time.LocalDateTime;
import java.util.List;

public class UserServiceImpl implements UserService {
    UserDao dao = new UserDaoImpl();

    @Override
    public Integer insert(UsersEntity users) {
        return dao.insert(users);
    }

    @Override
    public Integer update(UsersEntity users) {
        return dao.update(users);
    }

    @Override
    public Integer deleteByID(Long account) {
        return dao.deleteByID(account);
    }

    @Override
    public Long login(Long account, String password) {
        return dao.login(account,password);
    }

    @Override
    public Long register(Long phone) {
        return dao.register(phone);
    }

    @Override
    public List<UsersEntity> getAll() {
        return dao.getAll();
    }

    @Override
    public List<UsersEntity> getAll(Long account) {
        return dao.getAll(account);
    }

    @Override
    public List<UsersEntity> getAll(String name) {
        return dao.getAll(name);
    }

    @Override
    public Integer getAllID(Long account) {
        return dao.getAllID(account);
    }

    @Override
    public String sendSms(Long phone) {
        return dao.sendSms(phone);
    }
}
